package me.work.pay.jsyl.mvp.model.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

public class ShopEntity implements Parcelable {
    /**
     * nameStr : 朱永川,王磊
     * k : 0
     * shopId : 811d5f0cedf18e5ae309dcf032e876bf
     * time : 2019-10-21
     * id : 13744
     * userarr : [{"chargeXmid":"14bc000423974b669e164d40cb2406f0","chargeName":"朱永川"},{"chargeXmid":"84d490eed039403386670fced8122766","chargeName":"王磊"}]
     * device :
     */

    public String nameStr;
    public int k;
    public String shopId;
    public String time;
    public int id;
    public String device;
    public List<UserBean> userarr = new ArrayList<>();

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.nameStr);
        dest.writeInt(this.k);
        dest.writeString(this.shopId);
        dest.writeString(this.time);
        dest.writeInt(this.id);
        dest.writeString(this.device);
        dest.writeTypedList(this.userarr);
    }

    public ShopEntity() {
    }

    protected ShopEntity(Parcel in) {
        this.nameStr = in.readString();
        this.k = in.readInt();
        this.shopId = in.readString();
        this.time = in.readString();
        this.id = in.readInt();
        this.device = in.readString();
        this.userarr = in.createTypedArrayList(UserBean.CREATOR);
    }

    public static final Parcelable.Creator<ShopEntity> CREATOR = new Parcelable.Creator<ShopEntity>() {
        @Override
        public ShopEntity createFromParcel(Parcel source) {
            return new ShopEntity(source);
        }

        @Override
        public ShopEntity[] newArray(int size) {
            return new ShopEntity[size];
        }
    };
}
